package distrcomp;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.rmi.MarshalledObject;
import java.rmi.RMISecurityManager;
import java.rmi.RemoteException;
import java.rmi.activation.ActivationDesc;
import java.rmi.activation.ActivationException;
import java.rmi.activation.ActivationGroup;
import java.rmi.activation.ActivationGroupDesc;
import java.rmi.activation.ActivationGroupID;
import java.util.Properties;

public class ServerMain {
	public static void main(String[] args) throws RemoteException {
		try {
			SecurityManager sm = new RMISecurityManager();
		    System.setSecurityManager(sm);
		} catch(SecurityException e) {
			System.out.println("Could not set security manager.");
		}
		
		String regStr;
		if(args.length > 1) {
			regStr = args[1]; 
		} else {
			regStr = "localhost";
		}
		
		Server server = new Server(regStr);
		server.run();
	}
}
